   <template>
  <div class="workbench-business">
    <div class="workbench-title">
      {{ $t("workbench.businessSum") }}
    </div>
    <div class="workbench-business-content">
      <div class="workbench-business-wait" @click="undealBusiness">
        <i class="iconfont icon-duobianxing"></i>
        <p><span class="number">{{data.waiting}}</span><br><span class="tip">{{ $t("workbench.businessWait") }}</span></p>
      </div>
      <el-row>
        <el-col :span="12">
          <div class="workbench-business-today">
            <i class="iconfont icon-duobianxing color-c7"></i>
            <p><span class="curr-number">{{data.todayDeal}}</span><br><span>{{ $t("workbench.businessDay") }}</span></p>
        </div></el-col>
        <el-col :span="12">
          <div class="workbench-business-month">
            <i class="iconfont icon-duobianxing color-c7"></i>
            <p><span class="curr-number">{{data.monthDeal}}</span><br><span>{{ $t("workbench.businessMonth") }}</span></p>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'workbenchbusiness',
    props: ['data'],
    methods: {
      undealBusiness () {
        // 判断是否有工单权限
        let power = this.$store.state.session.clientMenu || []
        let isPower = power.some((item) => {
          if (item.id === 'nav_business') {
            return true
          }
        })
        if (!isPower) {
          return
        }
        let _obj1 = {
          module: 'business',
          random: Math.random()
        }
        this.$router.push({path: '/index/business', query: {active: 'business_my', flag: 'toCard'}})
        this.$store.commit('NOTICEBUSSINESS', _obj1)
      }
    }
  }
</script>
<style scoped lang="stylus">
  @import "styl/_workbench";
  @import "../../../assets/common";
  .workbench-title
    color $cf-gray2
  .workbench-business
    float left
    width calc(20% - 12px)
    margin 5px
    bors(1px,#e7e7eb)
    height 404px
    background $cf-white
  .workbench-business-wait
    width 140px
    height 135px
    border-radius 50%
    margin 30px auto 0
    color $cf-color1
    position relative
    font-family Helvetica
    .number
      font-size 36px
      font-family Helvetica
    .tip
      font-size 14px
      color $cf-gray2
    &:hover
      cursor pointer
    i
      font-size 140px
  .workbench-business-today
    width 98px
    height 98px
    float right
    margin-right 6px
    color $cf-gray4
    position relative
    font-size 14px
    font-family Helvetica
    i
      font-size 100px
  .workbench-business-month
    width 98px
    height 98px
    float left
    margin-left 6px
    color $cf-gray4
    position relative
    font-size 14px
    font-family Helvetica
    i
      font-size 100px
  .workbench-business-wait p
    width 100%
    font-size 16px
    text-align center
    line-height 20px
    position absolute
    top 50px
  .workbench-business-wait span
    font-size 38px
    text-align center
  .workbench-business-today p
  .workbench-business-month p
    width 100%
    font-size 14px
    text-align center
    line-height 20px
    position absolute
    top 30px
  .workbench-business-today span
  .workbench-business-month span
    text-align center
  .curr-number
    font-size 18px
    color $cf-gray4
  .color-c7
    color #c7c7c7
</style>
